package edu.pet.DAO;

import java.sql.*;

public class DBConn {
	String DriverName = "com.mysql.jdbc.Driver";
	String username = "root";
	String password = "123456";
	String url = "jdbc:mysql://localhost:3306/pet_hospital";
	Connection conn;
	public Connection CreateConn(){
		try {
			Class.forName(DriverName);
		} catch (ClassNotFoundException e) {
			System.out.println("err at Class.forName(DriverName);");
		}
		try {
			conn = DriverManager.getConnection(url, username, password);
		} catch (SQLException e) {
			System.out.println("conn = DriverManager.getConnection");
		}
		return conn;
	}
}
